package cn.bone.ou.community.mapper;

import cn.bone.ou.community.bean.House;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface HouseMapper extends BaseMapper<House> {

    /**条件查询列表*/
    List<House> list(@Param("communityId")Integer communityId,
                     @Param("start")Integer start,
                     @Param("num")Integer num,
                     @Param("buildNum")String buildNum,
                     @Param("unitNum")String unitNum,
                     @Param("houseNum")String houseNum,
                     @Param("isAuth")Integer isAuth);

    /**条件查询列表总数*/
    int countList(@Param("communityId")Integer communityId,
                  @Param("buildNum")String buildNum,
                  @Param("unitNum")String unitNum,
                  @Param("houseNum")String houseNum,
                  @Param("isAuth")Integer isAuth);

    /**根据楼栋单元房号查询*/
    House getByNum(@Param("buildNum")String buildNum,
                   @Param("unitNum")String unitNum,
                   @Param("houseNum")String houseNum,
                   @Param("communityId")Integer communityId);

    int ignoreInsert(@Param("communityId")Integer communityId,
                     @Param("buildNum")String buildNum,
                     @Param("unitNum")String unitNum,
                     @Param("houseNum")String houseNum,
                     @Param("saleArea")Double saleArea,
                     @Param("realArea")Double realArea,
                     @Param("houseType")Integer houseType,
                     @Param("isAuth")Integer isAuth,
                     @Param("usable")Integer usable,
                     @Param("createMemberId")Integer createMemberId,
                     @Param("createTime")Date createTime);

    /**获取小区房屋总数*/
    int countAll(@Param("communityId")Integer communityId);
}
